package cn.cjxy.springmvcdemo1.controller;


import org.springframework.web.HttpRequestHandler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

//实现了HttpRequestHandler接口  需要在mvc配置文件中再次配置bean
public class Controller02 implements HttpRequestHandler {
	@Override
	public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		System.out.println(this.getClass());
        //转发
		request.getRequestDispatcher("/WEB-INF/controller.jsp").forward(request, response);
	}
}